package com.reptile.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reptile.entity.YsMaterial;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 素材mapper
 * @author songyafei
 */
@Mapper
public interface YsMaterialMapper extends BaseMapper<YsMaterial> {


    /**
     * 查询新闻重复数据
     *
     * @return
     */
    @Select("SELECT ID FROM DB_MATERIAL GROUP BY MATER_URL HAVING COUNT(MATER_URL)> 1;")
    List<Long> queryRepeatData();
}
